package com.zb.mobile;

import com.zb.annotation.NumberPattern;
import com.zb.vo.NetworkFieldValVo;
import com.zb.vo.NetworkServiceAreaVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Author WEN
 * @Date 2023/11/22 0022
 **/
@Data
@ApiModel("服务商创建对象")
public class NetworkMobileCreateVo {

    @NotBlank(message = "服务商名称不能为空")
    @Length(max = 200, message = "服务商名称长度限制 200 个字符")
    @ApiModelProperty(value = "服务商名称", required = true)
    private String name;

    @NotNull(message = "团队模式不能为空")
    @NumberPattern(regexp = "^(1|2)$", message = "团队模式参数类型不合法")
    @ApiModelProperty(value = "团队模式：1-团队，2-个人", required = true)
    private Integer teamType;

    @NotBlank(message = "地址-省不能为空")
    @Length(max = 50, message = "地址-省长度限制 50 个字符")
    @ApiModelProperty(value = "地址-省", required = true)
    private String province;

    @NotBlank(message = "地址-市不能为空")
    @Length(max = 50, message = "地址-市长度限制 50 个字符")
    @ApiModelProperty(value = "地址-市", required = true)
    private String city;

    @NotBlank(message = "地址-区不能为空")
    @Length(max = 50, message = "地址-区长度限制 50 个字符")
    @ApiModelProperty(value = "地址-区", required = true)
    private String area;

    @Length(max = 50, message = "地址-镇长度限制 50 个字符")
    @ApiModelProperty(value = "地址-镇")
    private String town;

    @NotBlank(message = "详情地址不能为空")
    @Length(max = 200, message = "详情地址长度限制 200 个字符")
    @ApiModelProperty(value = "详细地址", required = true)
    private String address;

    @Valid
    @ApiModelProperty(value = "服务商自定义字段值对象")
    private List<NetworkFieldValVo> fieldVals;

    @Valid
    @ApiModelProperty(value = "服务区域对象")
    private List<NetworkServiceAreaVo> serviceAreas;
}
